import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import BasicTable from '@/components/basic/BasicTable'
import University from '@/components/basic/University'
import Major from '@/components/basic/Major'
import Course from '@/components/basic/Course'
import Trainingplan from '@/components/basic/Trainingplan'
import PlanMajorinfo from '@/components/basic/PlanMajorinfo'
import PlanTrainingtarget from '@/components/basic/PlanTrainingtarget'
import PlanCourse from '@/components/basic/PlanCourse'
import Semester from '@/components/basic/Semester'
import CoursetypeInfo from '@/components/basic/CoursetypeInfo'
import Teaching from '@/components/basic/Teaching'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home',
      name: 'Home',
      component: Home,
      meta: {
        requireAuth: true
      },
      children: [
        {
          path: 'basictable',
          name: 'BasicTable',
          component: BasicTable,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'university',
          name: 'University',
          component: University,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'major',
          name: 'Major',
          component: Major,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'course',
          name: 'Course',
          component: Course,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'trainingplan',
          name: 'Trainingplan',
          component: Trainingplan,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'planMajorinfo',
          name: 'PlanMajorinfo',
          component: PlanMajorinfo,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'planTrainingtarget',
          name: 'PlanTrainingtarget',
          component: PlanTrainingtarget,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'planCourse',
          name: 'PlanCourse',
          component: PlanCourse,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'semester',
          name: 'Semester',
          component: Semester,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'coursetypeInfo',
          name: 'CoursetypeInfo',
          component: CoursetypeInfo,
          meta: {
            requireAuth: true
          }
        },
        {
          path: 'teaching',
          name: 'Teaching',
          component: Teaching,
          meta: {
            requireAuth: true
          }
        }
      ]
    }
  ]
})
